package com.ishansong.ticket.enums;


import com.google.common.collect.Maps;

import java.util.Map;

/**
 * Created by saiyin on 15/9/19.
 * 工单状态
 */
public enum TicketStatusEnum {
    // 待处理、处理中、升级投诉、结案
    BC(0,"保存"),DCL(1,"待处理"),CLZ(2,"处理中"),JA(3,"结案"),DEL(-1,"删除");
    private int status;
    private String name;

    TicketStatusEnum(int status, String name) {
        this.status = status;
        this.name = name;
    }
    public static String getName(int status) {
        Map<Integer,String> map = Maps.newHashMap();
        for(TicketStatusEnum statusEnum : TicketStatusEnum.values()) {
            map.put(statusEnum.getStatus(),statusEnum.getName());
        }
        return map.get(status);
    }
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
